<?php echo $header; ?>
<div role="main" id="main"> 
            <section id="container">
            	<!-- breadcumbs-->
                <div id="breadcumbs">
                    <ol class="breadcumbs">
                        <?php for ($i=0;$i<sizeof($breadcrumbs);$i++) { ?>
                           
                            
                            <?php if($i+1==sizeof($breadcrumbs)) { ?>
                                 <li class="item current"><?php echo $breadcrumbs[$i]['text']; ?></li>
                            <?php } else { ?>
                            	<?php if($i==0) { ?>
                                	<li class="first root">
                                        <a href="<?php echo $breadcrumbs[$i]['href']; ?>">
                                            
                                        </a>
                               		</li>
                                <?php } ?>
                                <?php if($i==1) { ?>
                                
                                	<li class="first root-cate"><?php echo $breadcrumbs[$i]['text']; ?></li>
                                <?php } ?>
                                <?php if($i>1) { ?>
                                	<li class="first child-cate"><a href="<?php echo $breadcrumbs[$i]['href']; ?>"><?php echo $breadcrumbs[$i]['text']; ?></a></li>
                                <?php } ?>
                            <?php } ?>
                        <?php } ?>
                    </ol>
                </div>
                <!-- /breadcumbs-->
                
                <!--Banner-->
                <div class="page-banner">
                	<?php
                    	if($category_img) {
                    ?>
                    <img alt="" src="timthumb.php?src=<?php echo $category_img;?>&w=920&h=290">
                    <span class="banner-title"><?php echo $category_short_desc;?></span>
                    <?php
                        }
                        
                    ?>
                	
                    
                </div>
                <!--/Banner-->
                <?php echo $category_desc;?>
                <div class="heading-tt">
                    <h1 class="fll"><span><?php echo $this->model_catalog_category->getPathParent($this->data['category_id']);?>: <strong><?php echo $category_name;?></strong></span></h1>
                    <div class="product-filter flr">
                    	<?php if ($products) { ?>
                        <form id="filterForm" method="get" action="">
                            <fieldset>
                                <select id="sort-by" name="sort" onchange="location = this.value;">
                                    <?php foreach ($sorts as $sorts) { ?>
                                    <?php if ($sorts['value'] == $sort . '-' . $order) { ?>
                                    <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
                                    <?php } else { ?>
                                    <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
                                    <?php } ?>
                                    <?php } ?>
                                </select>
                                <label for="sort-by"><?php echo $text_sort;?></label>
                                <select id="products-number" class="number selectBox" name="nb" style="display: none;" onchange="location = this.value;">
                                    <?php foreach ($limits as $limits) { ?>
                                    <?php if ($limits['value'] == $limit) { ?>
                                    <option value="<?php echo $limits['href']; ?>" selected="selected"><?php echo $limits['text']; ?></option>
                                    <?php } else { ?>
                                    <option value="<?php echo $limits['href']; ?>"><?php echo $limits['text']; ?></option>
                                    <?php } ?>
                                    <?php } ?>
                                </select>
                                <label for="products-number"><?php echo $text_view_per_page;?>:</label>
    
                                <button id="productFilter" name="productFilter" type="submit">Filter</button>
                            </fieldset>
                        </form>
                        <?php } ?>
                    </div>
                </div>

            	<div class="overlay-group group">
                	
                    <ul class="product-list">
                  		<?php if(isset($products) && sizeof($products) > 0) {
                        foreach($products as $rs) {
                        ?>
                    	<li class="overlay-block">
                        	<a class="img-product" href="<?php echo $rs['href'];?>"><div class="overlay" style="opacity: 0;"></div>
                           		<?php
                                    if($rs['special']) {
                                ?>
                                                    <p class="promo-tag">
                                                        <span class="minus">-</span>
                                                        <span class="discount-num"><?php echo ($rs['price_percent']);?></span>
                                                        <span class="percent">%</span>
                                                    </p>
                                <?php 
                                    }
                                ?>
                                <p>
                                    <span class="prd-name"><?php echo $rs['name_short'];?></span>
                                    <span class="price flr"><?php if($rs['special']) {echo $rs['special'];} else { echo $rs['price'];} ?></span>
                                </p>
                                <img src="timthumb.php?src=<?php echo $rs['image'];?>&w=295&h=230" alt="<?php echo $rs['name'];?>" />
                            </a>
                        </li>
                        <?php 
                        	} 
                        }
                        ?>
                    </ul>
                    
                    <!-- Pager-->
                    <div class="pager">
                    	<div class="pager-inner flr">
                            
                            <?php echo $pagination;?>
                            <!--
                            <span class="prd-count fll"><strong id="countNum">1 - 9</strong> of <strong id="total">42</strong> products</span>
                            <a href="#" class="pager-btn prev disabled fll">Previous page</a>
                            <ol class="fll">
                            	
                                <li class="current"><a href="">1</a></li>
                                <li class="num"><a href="">2</a></li>
                                <li class="num"><a href="">3</a></li>
                                <li class="num"><a href="">4</a></li>
                                <li class="num"><a href="">5</a></li>
                            </ol>
                            <a href="" class="pager-btn next flr">Next page</a>
                            -->
                    	</div>
                    </div>
                    <!-- /Pager-->
                    
                    
                </div>
            </section>
        </div>
<?php echo $footer; ?>
<?php return;?>




<?php echo $header; ?>
		<div class="shop" id="main">
            <!-- / start main content -->  
            <div id="content" class="stall fl-right">
              
                
             <!-- Breadcumbs  -->
                            	<div id="breadcumbs" class="fl-left">
                                	<ul id="crumbs">
                                    <?php for ($i=0;$i<sizeof($breadcrumbs);$i++) { ?>
                                    	<li>
                                        
                                        <?php if($i+1==sizeof($breadcrumbs)) { ?>
                                        	<span><?php echo $breadcrumbs[$i]['text']; ?></span>
                                        <?php } else { ?>
                                      		<a href="<?php echo $breadcrumbs[$i]['href']; ?>">
                                       		<?php echo $breadcrumbs[$i]['text']; ?>
                                            </a>
                                        <?php } ?>
                                        
                                        </li>
                                     <?php } ?>
                                        
                                    </ul>
                                </div>
                                <!-- /Breadcumbs  -->
                                
                                <h1 class="tt-h1">Quầy hàng <?php echo $category_name;?></h1>
                                
                               <!-- Category in stall-->
                                <?php if(isset($categories) && sizeof($categories) > 0) {?>
                                <div class="stall-ctn">
                                    <div class="stall-slideshow common-bg fl-left">
                                        <div class="slideshow-ctn"><?php echo $category_img;?></div>
                                    </div>
                                    <div class="category-ctn fl-left">
                                        <h3 >Danh mục trong quầy hàng</h2>
                                        <div class="category-inner">
                                       
                                            <ul>
                                            <?php
                                       			 foreach($categories as $category) {
                                       		 ?>
                                             <?php if ($category['category_id'] == $category_id) { ?>
                                                  <li class="active"><a href="<?php echo $category['href']; ?>" ><?php echo $category['name']; ?></a></li>
                                                  <?php } else { ?>
                                                  <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
                                                  <?php } ?>
                                                
                                          <?php } ?>      
                                            </ul>
                                        </div>
                                        <div class="category-btm common-bg"></div>
                                	</div>
                                </div>
                                <?php } ?>
                                <!-- /Category in stall-->
                                
                                 <!-- Begin product list  -->
                                <div id="prdListInCat">
                                	<h2 class="tt-h2">Sản phẩm trong quầy hàng</h2>
                                    
                                	<!--
                                    <div class="category-nav top">
                                		  <?php if($product_total > $limit) {?>
                                        <div class="pager">
                                        	<span class="prd-stat"><?php echo $product_total;?> sản phẩm /</span>
                                            <span class="prd-page">Trang :</span>
                                        	
                                           <?php echo $pagination;?>
                                        </div>
                                        <?php } ?>
                                    </div>
                                    -->
                                	<ul class="prd-list">
                                    <?php if(isset($products) && sizeof($products) > 0) {
                                    foreach($products as $rs) {
                                    ?>
                                    	<li>
                                        	<a class="thumb" title="<?php echo $rs['name'];?>" href="<?php echo $rs['href'];?>"><img src="<?php echo $rs['image'];?>" alt="<?php echo $rs['name'];?>" /></a>
                                            <a class="prd-tt" href="<?php echo $rs['href'];?>"><?php echo $rs['name'];?></a>
                                            
                                            <p class="rating">
                                                <span class="min-rating-star inline-block">
                                                    <span style="width: <?php echo ($rs['ratingproduct']+1)*20; ?>%;" class="min-rating-star rated"></span>
                                                </span>
                                            </p>
                                             <p class="price active">
                                                Giá : 
                                                <?php
                                                 if($rs['price']>0) { 
                                                ?>
                                                <strong><?php echo $rs['price'];?></strong>
                                                <?php 
                                                } else {
                                                ?>
                                                 <?php echo $chuacogia;?>
                                                <?php
                                                }
                                                ?>
                                                </p>
                                             <?php if((int)$rs['is_new'] == 1) {?>
                                            <span class="new"><img src="catalog/view/theme/default/img/new.png" alt="Mới" /></span>
                                            <?php } ?>
                                        </li>
                                        
                                      <?php } } ?>
                                       
                                       
                                        
                                    </ul>
                                    <?php if($product_total > $limit) {?>
                                    <div class="category-nav bottom">
                                        
                                        <div class="pager">
                                        	<span class="prd-stat"><?php echo $product_total;?> sản phẩm /</span>
                                            <span class="prd-page">Trang :</span>
                                        	
                                           <?php echo $pagination;?>
                                        </div>
                                       
                                    </div>
                                     <?php } ?>
                                </div>
                                <!-- / Product list  -->
                                
                                
                                
                
                <?php //echo $mebuu_center_manufacturer_shop; ?>
                  <!-- Consultant/FAQ
                    <div class="article-list col-09">
                        <?php echo $mebuu_consulting_home; ?>
                        <?php echo $mebuu_faq_home; ?>
                    </div>
                   /Consultant/FAQ-->
             </div>
            <!-- sidebar -->
            <div id="sidebar" class="fl-left">
                <?php echo $mebuu_category_product_list; ?>
                <?php echo $mebuu_left_info_shop; ?>
                
                <?php echo $mebuu_supportonline_home; ?>
                
                <?php echo $mebuu_right_info_transport_home; ?>     
            </div>
        <!-- / end main content -->    
   		</div>
     </div>   
<?php echo $footer; ?>